package interpreterPattern;

/**
 * 终止符表达式；解析器表达式的结束
 */
public class Value extends Expression{

    private int value;

    // 赋值表达式
    public Value(int value) {
        this.value = value;
    }

    @Override
    public int interpret(Context context) {
        return this.value;
    }

    @Override
    public String toString() {
        return String.valueOf(value);
    }
}
